<div class="tablas-info">
    <div class="tabla-titulo">
        <h2><strong>RT'S</strong></h2>

        <div class="tabla-buttons">
            <div class="searchInput">
                <i class="fa fa-search"></i>
                <input type="text" class="search-query search" placeholder="Buscar..."/>
            </div>

            <a class="button-adicional" id="dropdownMenu2" data-toggle="dropdown" rel="tooltip" data-placement="top" data-original-title="Mas Acciones">
                <i class="fa fa-cog"></i>
            </a>
            <a class="button-adicional" href="#" data-toggle="collapse" data-target="#tabla-data" rel="tooltip" data-placement="top" data-original-title="Colapsar">
                <i class="fa fa-chevron-down"></i>
            </a>
            <a class="button-adicional" href="#" rel="tooltip" data-placement="top" data-original-title="Ayuda">
                <i class="fa fa-question-circle"></i>
            </a>

            <%= link_to new_receiving_ticket_path, :method => :get, class: "btn btn-primary btn-xs" do %>
                <i class="fa fa-plus"></i> Agregar RT
            <% end %>
                
            <%= link_to "Ver Reporte", receiving_tickets_path(:format => :pdf), :class => "btn btn-info btn-xs" %>
        </div>
    </div>

    <div id="tabla-data" class="in">
        <div class="table-responsive">
            <table id="tblData" class="table table-striped table-hover table-datos">
                <thead>
                    <tr>
                        <th>Numero</th>
                        <th>Fecha</th>
                        <th>Cliente</th>
                        <th>Proveedor</th>
						<th>PO</th>	
                        <th>Producto</th>
                        <th>Marca</th>                        
                        <th>Saldo</th>
                        <th></th>
                    </tr>
                </thead>

                <tbody>
                    <% @receiving_tickets.each do |receiving_ticket| %>
                        <tr>
                            <td><%= link_to receiving_ticket.id, receiving_ticket %></td>
                            <td><%= receiving_ticket.FechaRecepcion.strftime("%m/%d/%Y") %></td>
                            <td><%= receiving_ticket.rt_proveedor.proveedor.NombreRazon if !receiving_ticket.rt_proveedor.nil? and !receiving_ticket.rt_proveedor.proveedor.nil? %></td>
                            <td><%= receiving_ticket.IdTipoEntrada %></td>
                            <td><%= receiving_ticket.IdDestino %></td>
                            <td><%= receiving_ticket.Hora %></td>
                            <td><%= receiving_ticket.IdCliente %></td>
                            <td>
                            	<%= link_to edit_receiving_ticket_path(receiving_ticket), :rel => "tooltip", "data-placement" => "top", "data-original-title" => "Ver archivos PDF", :class => "btn btn-default btn-xs" do %>
                                    <i class="fa fa-file"></i>
                                <% end %>
                            	<%= link_to edit_receiving_ticket_path(receiving_ticket), :rel => "tooltip", "data-placement" => "top", "data-original-title" => "Imprimir", :class => "btn btn-default btn-xs" do %>
                                    <i class="fa fa-print"></i>
                                <% end %>
                                <%= link_to edit_receiving_ticket_path(receiving_ticket), :rel => "tooltip", "data-placement" => "top", "data-original-title" => "Editar", :class => "btn btn-default btn-xs" do %>
                                    <i class="fa fa-pencil"></i>
                                <% end %>
                                <%= link_to receiving_ticket, :method => :delete, :data => { :confirm => '¿Seguro que desea eliminar la RT?' }, :rel => "nofollow", "data-placement" => "top", "data-original-title" => "Eliminar", :class => "btn btn-xs btn-danger"  do %>
                                    <i class="fa fa-trash-o"></i>
                                <% end %>
                                <%= link_to "Detalle RT", detalle_rt_path(receiving_ticket) %>
                            </td>
                        </tr>
                    <% end %>
                </tbody>
            </table>
        </div>
    </div>
</div>



<%= page_entries_info @receiving_tickets %><br/>
<%= will_paginate @receiving_tickets %>
